<template>
  <div class="app-container">
    <main class="main-content">
      <router-view />
    </main>
    <!-- 不在StartPage显示标签栏 -->
    <TabBar v-if="$route.path !== '/'" />
    <!-- 陪伴角色 -->
    <Companion />
  </div>
</template>

<script>
import TabBar from './components/TabBar.vue'
import Companion from './components/Companion.vue'

export default {
  name: 'App',
  components: {
    TabBar,
    Companion
  }
}
</script>

<style>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #f5f5f5;
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  scrollbar-width: none;
}

.app-container {
  height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.main-content {
  flex: 1;
  overflow-y: auto;
  width: 100%;
  scrollbar-width: none;
}
</style>
